<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - iris.info - components/impl/genericRPG.h</title>
  <link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../../index.html">directory</a> - <a href="index.html">components/impl</a> - genericRPG.h</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>iris.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2010-05-24</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">1</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">100.0 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">1</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : 
<span class="lineNum">       2 </span>                : #ifndef  _genericrpg_h_INC
<span class="lineNum">       3 </span>                : #define  _genericrpg_h_INC
<span class="lineNum">       4 </span>                : 
<span class="lineNum">       5 </span>                : #include &quot;../../randomNumbers/impl/libRandom.hpp&quot;
<span class="lineNum">       6 </span>                : 
<span class="lineNum">       7 </span>                : #include &quot;../interfaces/processor.h&quot;
<span class="lineNum">       8 </span>                : #include &quot;genericInterface.h&quot;
<span class="lineNum">       9 </span>                : #include &quot;genericData.h&quot;
<span class="lineNum">      10 </span>                : #include &lt;fstream&gt;
<span class="lineNum">      11 </span>                : #include &lt;deque&gt;
<span class="lineNum">      12 </span>                : 
<span class="lineNum">      13 </span>                : #ifndef IN_OUT_MISMATCH
<span class="lineNum">      14 </span>                : #define IN_OUT_MISMATCH -1
<span class="lineNum">      15 </span>                : #endif
<span class="lineNum">      16 </span>                : 
<span class="lineNum">      17 </span>                : #ifndef SIM_SUCCESS 
<span class="lineNum">      18 </span>                : #define SIM_SUCCESS 0
<span class="lineNum">      19 </span>                : #endif
<span class="lineNum">      20 </span>                : 
<span class="lineNum">      21 </span>                : #ifdef REPORT_BASE
<span class="lineNum">      22 </span>                : #undef REPORT_BASE
<span class="lineNum">      23 </span>                : #endif
<span class="lineNum">      24 </span>                : 
<span class="lineNum">      25 </span>                : #define REPORT_BASE 20
<span class="lineNum">      26 </span>                : 
<span class="lineNum">      27 </span>                : #define DEFAULT_RAN_LAMDA 2.35
<span class="lineNum">      28 </span>                : #define DEFAULT_RAN_DESTINATION_TYPE &quot;uniform&quot;
<span class="lineNum">      29 </span>                : #define DEFAULT_RAN_LENGTH_TYPE &quot;uniform&quot;
<span class="lineNum">      30 </span>                : #define DEFAULT_RAN_ADDRESS 0
<span class="lineNum">      31 </span>                : #define MAX_ADDRESS 3
<span class="lineNum">      32 </span>                : #define MAX_LENGTH 10
<span class="lineNum">      33 </span>                : #define MIN_LENGTH 1
<span class="lineNum">      34 </span>                : #define MIN_DELAY 1
<span class="lineNum">      35 </span>                : #define MAX_DELAY 100
<span class="lineNum">      36 </span>                : #define DEFAULT_RAN_MAX_VC 1
<span class="lineNum">      37 </span>                : #define DEFAULT_RAN_SEED 324986
<span class="lineNum">      38 </span>                : #define DEFAULT_RAN_MAX_TIME 100
<span class="lineNum">      39 </span>                : #define HOT_SPOTS 3
<span class="lineNum">      40 </span>                : #define DEFAULT_RAN_TRACE_FILE_NAME &quot;randomOut.tr&quot;
<span class="lineNum">      41 </span><span class="lineCov">              4 : const string run_destination_type = &quot;uniform&quot;;</span>
<span class="lineNum">      42 </span>                : #define MAX(a,b) (((a)&lt;(b))?(b):(a))
<span class="lineNum">      43 </span>                : #define MIN(a,b) (((a)&lt;(b))?(a):(b))
<span class="lineNum">      44 </span>                : 
<span class="lineNum">      45 </span>                : class GenericRPG : public Processor
<span class="lineNum">      46 </span>                : {
<span class="lineNum">      47 </span>                : 
<span class="lineNum">      48 </span>                :     private:
<span class="lineNum">      49 </span>                :         deque&lt; HighLevelPacket &gt; out_packets;
<span class="lineNum">      50 </span>                :         deque&lt; HighLevelPacket &gt; sent_packets;
<span class="lineNum">      51 </span>                :         string out_filename;
<span class="lineNum">      52 </span>                :         uint vcs;
<span class="lineNum">      53 </span>                :         ofstream out_file;
<span class="lineNum">      54 </span>                :         vector&lt; bool &gt; ready;
<span class="lineNum">      55 </span>                :         unsigned int last_vc;
<span class="lineNum">      56 </span>                :         bool only_sink;
<span class="lineNum">      57 </span>                :         bool sending;
<span class="lineNum">      58 </span>                :         void handle_new_packet_event(IrisEvent* e);
<span class="lineNum">      59 </span>                :         void handle_ready_event(IrisEvent* e);
<span class="lineNum">      60 </span>                :         void handle_out_pull_event(IrisEvent* e);
<span class="lineNum">      61 </span>                :         libRandom::randomNumberGenerator generator;
<span class="lineNum">      62 </span>                : 
<span class="lineNum">      63 </span>                :     public :
<span class="lineNum">      64 </span>                :         GenericRPG();
<span class="lineNum">      65 </span>                :         ~GenericRPG();
<span class="lineNum">      66 </span>                :         /* stats variables */
<span class="lineNum">      67 </span>                :         unsigned int packets;
<span class="lineNum">      68 </span>                :         uint max_sim_time;
<span class="lineNum">      69 </span>                :         void init_generator();
<span class="lineNum">      70 </span>                :         double lamda;
<span class="lineNum">      71 </span>                :         libRandom::randomNumberGenerator::distribution destination_type;
<span class="lineNum">      72 </span>                :         libRandom::randomNumberGenerator::distribution length_type;
<span class="lineNum">      73 </span>                :         libRandom::randomNumberGenerator::distribution delay_type;
<span class="lineNum">      74 </span>                :         unsigned int address;
<span class="lineNum">      75 </span>                :         unsigned int max_address;
<span class="lineNum">      76 </span>                :         unsigned int min_length;
<span class="lineNum">      77 </span>                :         unsigned int max_length;
<span class="lineNum">      78 </span>                :         unsigned int min_delay;
<span class="lineNum">      79 </span>                :         unsigned int max_delay;
<span class="lineNum">      80 </span>                :         unsigned int hot_spots;
<span class="lineNum">      81 </span>                :         unsigned long long int max_time;
<span class="lineNum">      82 </span>                :         unsigned int seed;
<span class="lineNum">      83 </span>                :         void setup(uint no_nodes, uint vcs, uint max_sim_time);
<span class="lineNum">      84 </span>                :         void finish();
<span class="lineNum">      85 </span>                :         void pre_tick();
<span class="lineNum">      86 </span>                :         void post_tick();
<span class="lineNum">      87 </span>                :         void idle();            
<span class="lineNum">      88 </span>                :         void process_event(IrisEvent* e);
<span class="lineNum">      89 </span>                :         void set_no_vcs( uint v );
<span class="lineNum">      90 </span>                :         string toString() const;
<span class="lineNum">      91 </span>                :         bool compare();
<span class="lineNum">      92 </span>                :         set&lt; HighLevelPacket &gt; get_all_sent();
<span class="lineNum">      93 </span>                :         set&lt; HighLevelPacket &gt; get_all_recv();
<span class="lineNum">      94 </span>                :         void init();    
<span class="lineNum">      95 </span>                : };
<span class="lineNum">      96 </span>                : 
<span class="lineNum">      97 </span>                : 
<span class="lineNum">      98 </span>                : 
<span class="lineNum">      99 </span>                : #endif   /* ----- #ifndef _genericrpg_h_INC  ----- */
<span class="lineNum">     100 </span>                : 
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
